package org.yx.core.handler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang3.StringUtils;

import com.jfinal.core.ActionHandler;

public class JsResourceHandler extends ActionHandler {
    public void handle(String target, HttpServletRequest request,
                       HttpServletResponse response, boolean[] isHandled) {
        String path = request.getContextPath();
        String url = request.getRequestURI();
        if (target != null
                && (StringUtils.endsWithIgnoreCase(target, ".js") || StringUtils
                .containsIgnoreCase(target, ".js?_dc"))) {
            return;
        }

        this.next.handle(target, request, response, isHandled);
    }
}
